package com.zksk.mbg.admin.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.zksk.common.core.web.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>
 * 产品费率表（机构产品&客户.平台产品要求）
 * </p>
 *
 * @author Zksk Acmen
 * @since 2022-12-02
 */
@Data
@Accessors(chain = true)
@TableName("platform_rate")
@ApiModel(value = "Rate对象", description = "产品费率表（机构产品&客户.平台产品要求）")
public class Rate extends BaseEntity {

    @ApiModelProperty("主键ID")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("费率分类（工程建设1，政府采购2 3）")
    @TableField("`type`")
    private String type;

    @ApiModelProperty("费率(千分之)")
    @TableField("cost_ratio")
    private Float costRatio;

    @ApiModelProperty("上线费率")
    @TableField("online_rate")
    private Float onlineRate;

    @ApiModelProperty("最低保费")
    @TableField("min_pay_num")
    private BigDecimal minPayNum;

    @ApiModelProperty("描述")
    @TableField("`desc`")
    private String desc;

    @ApiModelProperty("活动优惠")
    @TableField("discount")
    private String discount;

    @TableField(value = "del_flag", fill = FieldFill.INSERT)
    @TableLogic
    private Integer delFlag;

    public static final String ID = "id";

    public static final String TYPE = "type";

    public static final String COST_RATIO = "cost_ratio";

    public static final String MIN_PAY_NUM = "min_pay_num";

    public static final String DESC = "desc";

    public static final String DEL_FLAG = "del_flag";

    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
